public class WhileExercise2 {
    public static void main(String[] args) {
        int count = 0;
        int i = 100;
        while ( i < 1000 ) {

            int bai = i / 100;
            int shi = i / 10 % 10;
            int ge = i % 10;
            if (Math.pow(bai,3) + Math.pow(shi,3)+ Math.pow(ge,3) == i) {
                System.out.println(i);
                count++;
            }
            i++;
        }
        System.out.println("水仙花数的个数： " + count);
    }
}
